﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Churchtoolkit.DataAccess.Entities;
using Churchtoolkit.Utils.Authentication;

namespace Churchtoolkit.Web.Shell.Services
{
    public class CurrentMember : ICurrentMember
    {
        public static implicit operator CurrentMember(SecureMemberDto member)
        {
            return new CurrentMember
                       {
                           Email = member.Email,
                           Id = member.MemberId,
                           DisplayName = member.DisplayName
                       };
        }

        #region ICurrentUser Members

        public string Email { get; set; }

        public int Id { get; set; }

        public string DisplayName { set; get; }

        #endregion
    }
}
